package com.iwop.moto.service.impl;

import com.iwop.moto.model.MBankAccount;
import com.iwop.moto.model.SuperRecordModel;
import com.iwop.moto.service.BaseService;
import com.iwop.moto.service.MBankAccountService;
import org.springframework.stereotype.Service;

import java.util.Calendar;
import java.util.List;

/**
 * Created by mobom on 2016/9/29.
 */
@Service("mBankAccountService")
public class MBankAccountServiceImpl extends BaseService implements MBankAccountService{
    @Override
    public void insertMBankAccount(MBankAccount mBankAccount) {
        getSqlSession().insert("MBankAccountMapper.insert",mBankAccount);
    }

    @Override
    public void updateMBankAccount(MBankAccount mBankAccount) {
        getSqlSession().update("MBankAccountMapper.update", mBankAccount);
    }

    @Override
    public List getMBankAccount(SuperRecordModel SRModel) {
        return  getSqlSession().selectList("MBankAccountMapper.selectMBankAccounts", SRModel);
    }

    @Override
    public MBankAccount findBySid(String sid){
        return  getSqlSession().selectOne("MBankAccountMapper.findBySid",sid);
    }

    @Override
    public void updateStatusFlagBySid(MBankAccount mBankAccount){
        getSqlSession().update("MBankAccountMapper.updateStatusFlagBySid",mBankAccount);
    }
}
